<template>
  <div class="shoplist" > 
    <div class="box" v-for="(item, index) in list" :key="index">
      <div class="image">
      <img :src="item.picUrl" alt="">
    </div>
    <div class="desc" >
      <div class="name">{{ item.name }}</div>
      <div class="box">
        <div class="score">☆4.3</div>
        <div class="count">{{ item.minPriceTip }}</div>
      </div>
      <div class="int">{{ item.minPriceTip }}&emsp;远距离配送¥3</div>
      <div class="time">{{ item.deliveryTimeTip }}&nbsp;3.9km</div>
    </div>
    </div>
  </div>
</template>

<script>
import { shop_list } from "../api";
export default {
  name: "shoplist",
  data() {
    return {
      list: [],
    };
  },
  
  mounted() {
    shop_list({}).then((res) => {
        console.log(res.data);
      this.list = res.data.list;
    });
  },
};
</script>

<style scoped>
.shoplist {
  height: 80px;
  display: flex;
  margin-top: 20px;
  flex-wrap: wrap;
}
.shoplist .box{
  display: flex;
}
.shoplist img {
  height: 60px;
}
.shoplist .desc {
  flex: 1;
  margin-left: 10px;
}
.shoplist .desc .name {
  font-size: 16px;
  font-weight: 800;
  width: 100%;
}
.shoplist .desc {
  display: flex;
  flex-direction: column;
}
.shoplist .desc .score {
  font-size: 12px;
  width: 100%;
}
.shoplist .desc .int {
  font-size: 12px;
  width: 100%;
  margin-top: 10px;
}
.shoplist .desc .time {
  font-size: 12px;
  width: 100%;
  margin-top: 10px;
}
.shoplist .desc .box {
  font-size: 12px;
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}
.shoplist .desc .box .count {
  width: 80px;
  margin-left: 10px;
}
</style>